All Functions Used So Far, Week 7

chisq.test

{stats}

Chi-Squared test (e.g. for cross-tabulations)

read_dta

{haven}

Read a .dta file (Stata data)

as.numeric

{base}

Coerce a vector to numeric

summary

{base}

Obtain summary statistics or detailed regression output

aes

{GGPLOT2}

Construct aesthetic mapping of a ggplot graph

theme_classic

{GGPLOT2}

A minimalistic theme with no gridlines

scale_y_continuous

{GGPLOT2}

Customise continuous y axis

as.character

{base}

Coerce a vector to character

geom_point

{GGPLOT2}

Generates a scatter plot

geom_smooth

{GGPLOT2}

Generates a smoothed conditional means curve / line

t.test

{stats}

Performs one and two sample t-tests on vectors of data.

leveneTest

{car}

Computes Levene’s test for homogeneity of variance across groups.

mutate

{dplyr}

Modify/create a column in a data frame

read_excel

{readxl}

Read an Excel file

ggplot

{GGPLOT2}

Create a ggplot graph

ordered

{dplyr}

Create an ordered factor

prop.test

{stats}

Test of Equal or Given Proportions

setwd

{base}

Set Working Directory

with

{base}

evaluate expression in the context of a data frame

c

{base}

Combine values/vectors into a vector

table

{base}

Obtain frequency table of a variable/cross-tabulation of two variables

library

{base}

Load an R package

scale_x_continuous

{GGPLOT2}

Customise continuous x axis

attach

{base}

Attach Set of R Objects to Search Path

lm

{base}

Fit a linear model

cut

{base}

Convert Numeric to Factor

ifelse

{base}

Return a or b depending on the value of test

The end!